Fast motion estimation using N-queen pixel decimation

ABSTRACT

The present invention proposes a fast motion estimation using N-queen pixel decimation, whereby after a reference block and a block to be processed are selected in a video sequence, an N×N queens pattern is used for pixel decimation to perform block match, thereby obtaining a good enough block difference value. The present invention combines pixel decimation with fast motion estimation for search points reduction to achieve the object of simplifying computational complexity of motion estimation. Therefore, the present invention can sieve out sufficiently representative pixels and will not increase extra computational complexity.

FIELD OF THE INVENTION

[0001] The present invention relates to a motion estimation and, more particularly, to a fast motion estimation using N-queen pixel decimation to remove redundancy in video sequence so as to achieve the object of video compression.

BACKGROUND OF THE INVENTION

[0002] Along with progress of scientific technology, the flow and quality of video data in transmission of video sequence become more and more important. A video sequence is composed of a series of images in a continuous time. Because the required storage space of a video sequence is very large, for a limited storage equipment or transmission bandwidth, it is expected that the required storage space of the video sequence can be reduced. The video sequence thus needs to be compressed. Therefore, the video compression technique is required. Video compression usually makes use of removing redundancy in video data to achieve the object of compression. Motion estimation is a compression technique used to remove temporal redundancy on the time axis.

[0003] The motion estimation describes how to find the most approximate block with the present processed one on two adjacent frames of time axis in a video sequence. The motion estimation generally makes use of search points reduction and pixel decimation to reduce computational complexity. Methods of search points reduction include famous fast algorithms like three steps search (TSS) algorithm, 2D log search algorithm, new three points search algorithm (NTSS algorithm), diamond search algorithm, and motion vector field adaptive search technology (MV_FAST algorithm), and predictive motion vector field adaptive search technology (PMV_FAST algorithm).

[0004] For adjacent pixels on the same frame, the brightness thereof ought to be very similar. Therefore, for pixels in a block, it is not necessary for every pixel to undergo computational criterion of difference value. This is because some pixels in a block may be noise so that if they are taken into account when calculating difference value between blocks, decision of motion estimation will be affected. For a uniform block, there will usually little difference for the brightness values between adjacent pixels usually. Therefore, when calculating difference value between blocks, it is not necessary for every pixel to undergo computational criterion of difference value. It is only necessary to pick some pixels sufficiently to represent the block for comparison.

[0005] Computational complexity for comparison of blocks can be reduced if the really representative pixels can be found. Therefore, a pixel decimation using similarity between pixels to reduce computational complexity of motion estimation is thus provided. For motion estimation in video compression, the pixel decimation can be generally divided into regular pixel decimation and adaptive pixel decimation. These two methods have their respective advantages and disadvantages. The regular pixel decimation (e.g., ¼ pixel decimation) makes use of fixed samples to reduce sampling rate. The embodiment is thus very simple and quick. It is not necessary to calculate which pixels are more representative for calculation of block difference value. However, the positions of selected pixels by reducing the sampling rate are fixed. When the brightness values in a block vary abruptly, the pixels selected by the regular pixel decimation may be not sufficiently representative for adjacent pixels, resulting in loss of important information and thus causing errors in decision of motion estimation.

[0006] The advantage of adaptive pixel decimation is that the samples for reducing sampling rate are variable. The adaptive pixel decimation will dynamically select which pixels for representing the whole block to perform calculation of block difference value according to variation of brightness values in the block. Accordingly, when the brightness values vary abruptly, motion estimation will select more pixels to keep sufficiently representative. When the brightness values vary little, motion estimation only selects less pixels to have sufficient representation for calculation of block difference value. Although this way of pixel decimation can avoid the disadvantage that every pixel in a block undergoes the criterion of difference value calculation, redundant time will be wasted in determining which pixels are sufficiently representative, hence increasing extra computational complexity and thus increasing some computational burden of motion estimation.

[0007] The present invention aims to propose a new pixel decimation method, which can sieve out sufficiently representative pixels and will not increase extra computational complexity, hence effectively resolving the above disadvantages.

SUMMARY OF THE INVENTION

[0008] The primary object of the present invention is to propose a fast motion estimation using N-queen pixel decimation, which makes use of N-queen pixel decimation to lower sampling rate for reducing computational complexity of motion estimation. Moreover, the fast motion estimation can sieve out sufficiently representative pixels and will not increase extra computational complexity.

[0009] Another object of the present invention is to propose a fast motion estimation using N-queen pixel decimation, which maintains visual quality and lowers bit rate at the same time of reducing computational complexity.

[0010] To achieve the above objects, the present invention first selects a reference block and a block to be processed in a video sequence. Each block is composed of N×N pixels. N is larger than or equal to 4. Next, an N×N queens pattern is used so that only one pixel is selected in each row, column, and diagonal of the two blocks. There are totally N pixels selected in each of the two blocks. Subsequently, block match is performed to obtain a block difference value. If the block difference value is good enough, motion estimation is done; otherwise, the next set of blocks is continually selected, the queens the pattern is made use of, and block match is performed until a good enough block difference value is obtained.

[0011] The various objects and advantages of the present invention will be more readily understood from the following detailed description when read in conjunction with the appended drawings, in which:

BRIEF DESCRIPTION OF THE DRAWINGS

[0012]FIG. 1 is a flowchart diagram of a fast motion estimation of the present invention;

[0013]FIG. 2 is a diagram according to an embodiment of the present invention, wherein a 4×4 queens pattern is used;

[0014]FIG. 3 is a diagram of the present invention, wherein an N×N queens pattern is divided into several layers for orderly sampling;

[0015]FIG. 4 shows four kinds of sampling patterns in experiments of the present invention; (a) full sampling pattern, (b) ¼ sampling pattern, (c) 4 queens pattern, and (d) 8 queens pattern; and

[0016]FIG. 5 is a diagram showing experimental results under different test conditions.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] The present invention combines pixel decimation with fast motion estimation of search points reduction to achieve the object of simplifying computational complexity of motion estimation. Therefore, the present invention can sieve out sufficiently representative pixels and will not increase extra computational complexity.

[0018] As shown in FIG. 1, the fast motion estimation using N-queen pixel decimation comprises the following steps. First, the whole fast motion estimation is started in step S10. Next, a reference block and a block to be processed are selected in a video sequence (step S12). Each block is composed of N×N pixels. N is larger than or equal to 4. The reference block and the block to be processed are selected among frames, sub-blocks of frames, and pixel layers.

[0019] Important edge information or line information in a block may appear at any direction, column, row, or diagonal in the block. In order to avoid losing information at these possible directions, it is necessary to select representative pixels at any direction in the block. Therefore, in the present invention, an N×N queens pattern is used after the step S12 (step S14). Only a pixel is selected from each column, row, and diagonal in the two blocks. There are totally N pixels selected.

[0020] After N pixels are selected from the reference block and the block to be processed, block match is immediately performed (step S16). A block difference is obtained between the block to be processed and the reference block by using difference calculation criterion. This result is the result obtained by calculating the selected pixels. If the block difference is good enough, the motion estimation is finished (step S18). If the block difference is not good enough, the step S12 is repetitively performed. The next reference block and block to be processed are selected, and queens pattern of the step S14 is repetitively performed. Block match is performed (step S16) to obtain another block difference. All the obtained block differences are compared to pick out an optimal block difference. If the optimal block difference is good enough (e.g., being smaller than a preset critical value or being a minimum), the motion estimation can be finished (step S18). Otherwise, the step S12 is repetitively performed until a good enough block difference conforming to the requirement is obtained.

[0021] Finally, after finishing the motion estimation, redundancy in the video sequence can be removed so that the encoder only needs to encode difference of frame. Because the pixels picked out by the present invention are representative, visual quality can be kept and bit rate can be reduced at the same time of reducing computational complexity.

[0022] The ways of calculating the block difference include mean square error (MSE), mean absolute difference (MAD), and sum of absolute difference (SAD). These calculation criteria of difference are made use of to determine similarity between blocks. The selected block is of fixed size or variable size. The block's shape can be square or non-square according to different setting of user.

[0023] For directional representation of pixel, the N-queens pattern has a certain representation for pixels at any direction in a block. For local representation of pixel, the N-queens pixel decimation is better than other methods of pixel decimation in the prior art. As shown in FIG. 2, in an 8×8 pixels, with the 4×4 queens pattern as an example, the distances between the selected pixels and adjacent pixels in the area are all 1. For local representation, the pixels selected by the 4×4 queens pattern have higher representation than those selected by other ways. The present invention uses the 44 queens pattern as a sub-block. A block having N×N pixels can thus be equally divided into N/4×N/4 sub-blocks, each being a 4×4 queens pattern. Because only four pixels will be simultaneously selected from each sub-block, the computational complexity will only be ¼ of the original full search algorithm. Similarly, the computational complexity of 8×8 queens pattern is only ⅛ of the original full search algorithm. Therefore, for N×N queens pattern, the computational complexity of the present invention is only 1/N of the original algorithm, hence increasing the calculation speed for N times.

[0024] However, the way of solving N-queens problem is not unique. For instance, there are 92 different patters for 8-queens pattern in an 8×8 block. For these 92 different samples for reducing sampling rates, one can calculate the average distance between selected pixels and non-selected pixels in each pattern, i.e., local representation of pixel. According to the calculation result, the average distances of these 92 sets of patterns distribute from 1.29 to 1.37 pixels. The difference of average distance of these 92 sets of patterns is only 0.08 pixels, resulting in a difference not larger than 0.1 dB in PSNR. Therefore, no matter which sampling pattern is selected, motion estimation (coding efficiency) will be little affected.

[0025] The present invention can further divide the N×N queens pattern into several layers for performing the action of reducing sampling rate. Each layer is composed of n blocks of the same size of N/n×N/n pixels. As shown in FIG. 3, at the first layer, if each sub-block is viewed as a pixel, the action of reducing sampling rate of the first time can be performed to the whole block. That is, the sub-block to be processed for calculation of block difference is selected. At the second layer, each sub-block can be viewed as a complete block so that the action of reducing sampling rate can be performed to each sub-block. Moreover, when performing pixel decimation according to the layer, different sampling patterns can be selected. In order to achieve the effect of the present invention, it is only necessary for the sampling pattern of at least a layer to be the queens pattern.

[0026] The above principle and effect will be exemplified below.

[0027] In order to analyze the performance of motion estimation, the present invention uses the latest video compression standard: MPEG4 reference software as the experiment simulation software, and makes use of mean absolute difference (MAD) for calculation of block difference. In experiment, the three parameters of sampling patterns, search strategies, and test conditions are used to analyze coding efficiency of different methods.

[0028] For sampling patterns, the present invention uses the four sampling patterns shown in FIG. 4. The four sampling patterns are full pattern (labeled as F), quarter sampling pattern (labeled as Q), 4-queens pattern (labeled as 4), and 8-queens pattern (labeled as 8). Besides, two-layers recursive scheme (labeled as 4R) makes use of the same 4-queens pattern at the block layer and the pixel layer.

[0029] For search strategies, the present invention adopts the full search algorithm and other two algorithms adopted by the MPEG4 committee: MV_FAST and PMV_FAST. In experiment, pixel decimation is combined with various kinds of fast search algorithms.

[0030] The whole experimental result is shown in FIG. 5. In the table of experimental result, the ‘Full’ field means full search algorithm, the ‘MV” field means MV_FAST approach, and the ‘PMV’ field means PMV_FAST approach. In the method field, the first symbol of fast algorithm means the search strategy, and the second symbol thereof means the sampling sample. For instance, PMV_(—)8 means that the search strategy is PMV_FAST approach, and the sampling sample is 8-queens pixel pattern. The ‘Format’ field means the storage format of video sequence. The ‘BR’ (bit rate) field uses kbps (kbits per second) as the unit. The ‘FPS’ (frames per second) field means frame rate. The ‘SA’ field means search area. The ‘PSNRY’ field means PSNR (peak signal noise ratio) of luminance. The ‘ChkPts’ field means the number of search points really compared with the block to be processed in motion estimation. The ‘Pixels’ field means the number of pixels selected for calculation of block difference in a block in motion estimation. The final ‘Ratio’ field means the factor of improvement when the computational complexity of the fast algorithm of the field is compared with that of the full search algorithm.

[0031] As shown in FIG. 5, these experimental results under different test conditions show that, for video sequence of frames of little variation, the video compression quality of 4-queens pattern is slightly better than that of quarter sampling pattern, and the video compression quality of quarter sampling pattern is slightly better than that of 8-queens pattern. For video sequence pf frames of abrupt variation, the video compression quality of 4-queens pattern is much better than that of quarter sampling pattern, and 8-queens pattern can achieve the video compression quality approximate to that of quarter sampling pattern by only using a half of the number of pixels selected by quarter sampling pattern. When the frame size of video sequence becomes larger, the block becomes relatively smaller. At this time, pixels selected by N-queens pattern have higher representation so that the video compression quality of N-queens pattern will be higher that those of other pixel sampling patterns. For different sizes of search area, the video compression quality of N-queens pattern will not be affected. When N-queens pattern is combined with other different search approaches, the video compression quality of 4-queens pattern is approximate to that of the original search approach with an error of about 0.1 dB. The video compression quality of 8-queens pattern has an error of about 0.2˜0.3 dB because only a half of the number of pixels of 4-queens pattern are selected. For different bit rates, the video compression quality of N-queens pattern will not be affected. Therefore, N-queens pattern has little influence to video compression quality and bit rate under these test conditions.

[0032] According to the experimental results and the above analysis, N-queens pattern proposed by the present invention has the compression performance approximate to that of the original approach under different test conditions of video sequence, sampling pattern, search strategy, search area, and bit rate. Moreover, less quantity of computation is achieved by adopting N-queens pixel decimation, and a better video compression quality can be obtained under the same bit rate.

[0033] To sum up, the present invention has many advantages. First, because the N-queens pattern is a regular pixel decimation pattern, the advantage of easy embodiment is achieved, and this method can effectively reduce the computational complexity of the original full search algorithm to 1/N. Second, the principle of N-queens pattern can be very simply combined with other fast algorithms to further reduce the computational complexity. Third, the video compression quality is hardly affected after N-queens pattern is combined with other search strategies. This is because that the pixels selected by N-queens pattern have higher local representation and directional representation at any direction in a block.

[0034] Although the present invention has been described with reference to the preferred embodiment thereof, it will be understood that the invention is not limited to the details thereof. Various substitutions and modifications have been suggested in the foregoing description, and other will occur to those of ordinary skill in the art. Therefore, all such substitutions and modifications are intended to be embraced within the scope of the invention as defined in the appended claims. 

I claim:
 1. A fast motion estimation using N-queen pixel decimation, comprising the steps of: (a) selecting a reference block and a block to be processed in a video sequence, each said block being composed of N×N pixels, N being larger than or equal to 4; (b) using an N×N queens pattern to select only a pixel in each column, row, and diagonal in said two blocks, there being totally N pixels selected in each said block; (c) performing block match to obtain a block difference value, finishing the motion estimation if said block difference value is good enough, performing step (d) otherwise; (d) selecting the next reference block and block to be processed, performing block match to obtain a block difference value after repetitively performing said step (b), comparing all of the block difference values to obtain an optimal one; and (e) finishing the motion estimation if said optimal block difference value is good enough, repetitively performing said step (d) otherwise.
 2. The fast motion estimation as claimed in claim 1, wherein said block is selected among a group composed of frames, sub-blocks of frames, and pixel layers.
 3. The fast motion estimation as claimed in claim 1, wherein said N×N queens pattern in said step (b) can be divided into several layers for performing the action of reducing sampling rate, each layer being composed of n blocks of the same size of N/n×N/n.
 4. The fast motion estimation as claimed in claim 3, wherein different sampling patterns can be selected when performing pixel decimation according to said layer, and the sampling pattern of at least a layer is the queens pattern.
 5. The fast motion estimation as claimed in claim 1, wherein said block difference value obtained during the process of said block match in said steps (c) and (d) is the result after said block to be processed and said reference block undergo the criterion of difference value calculation.
 6. The fast motion estimation as claimed in claim 1 or 5, wherein only the selected pixels are calculated when calculating the difference value between said blocks in said steps (c) and (d).
 7. The fast motion estimation as claimed in claim 5, wherein the ways of calculating said block difference value include mean square error, mean absolute difference, and sum of absolute difference.
 8. The fast motion estimation as claimed in claim 1, wherein said block is of fixed size.
 9. The fast motion estimation as claimed in claim 1, wherein said block is of variable size.
 10. The fast motion estimation as claimed in claim 1, wherein said block is a square block.
 11. The fast motion estimation as claimed in claim 1, wherein said block is a non-square block.
 12. The fast motion estimation as claimed in claim 1, wherein other fast algorithms can be directly combined after said step (b) to obtain a motion vector of said block to be processed via said block difference value.
 13. The fast motion estimation as claimed in claim 1, wherein redundancy in the video sequence can be removed after finishing the motion estimation so that it is only necessary for an encoder to encode the difference of frame. 